Information management apparatus and information managing method

ABSTRACT

An information management apparatus for managing data includes a rewritable nonvolatile memory, and a memory controller configured to control inputting information into and outputting information from the nonvolatile memory. The memory controller overwrites a data, which includes a first validity check information, a first data body, a second validity check information, a second data body having the same data as the first data body and a third validity check information arranged in this order, in a designated address area in the nonvolatile memory when the memory controller performs a writing control in which the memory controller writes data in the nonvolatile memory.

TECHNICAL FIELD

The present invention relates to an information management apparatuswhich manages information by using a rewritable nonvolatile memory andan information managing method by using a computer rewritablenonvolatile memory.

BACKGROUND ART

Recently, a process has been implemented where a learning value obtainedthrough vehicle control is stored in a nonvolatile memory at the end ofcontrolling a vehicle system and the learning value is then read fromthe nonvolatile memory and later to be used for vehicle control when thevehicle system is to be started. An EEPROM (Electronically Erasable andProgrammable Read Only Memory) is preferably used as the nonvolatilememory. A CD-R, a CD-RW, a DVD-R, a DVD-RW, a hard disk, etc. may alsobe used as the nonvolatile memory.

In an information management apparatus which utilizes this type ofprocess, data of the learning value may be stored partially in a casewhere an accident such as a power shutdown or the like occurs when thedata is being stored in the nonvolatile memory. As a result, a problemoccurs in that it becomes impossible to use the learning value which hasbeen collected.

This problem occurs especially in a case where the informationmanagement apparatus is mounted on a vehicle. In this case, a battery ofthe vehicle is replaced by a user of the vehicle or a repair shopshortly after the vehicle is stopped. As a result, a writing process ofa data block of the nonvolatile memory may not be completely finished. Asimilar problem may occur not only in the case where the apparatus ismounted on the vehicle, but also in the case where there is an apparatusor a system, such as a cellular phone or the like, where a battery isdetachable.

In this connection, an invention of an information management apparatusin which data is stored in both a management area sector and a backupsector that are formed in a flash memory is disclosed (see, e.g., PatentDocument 1).

According to this information management apparatus, when update data iswritten into the apparatus, data stored in the backup sector is deletedfirst, and then a copy of the data stored in the management area sectoris written into the backup sector. Further, the data stored in themanagement area sector is deleted after a signature of the managementarea sector is cleared, and finally the update data is written into themanagement area sector. A signature is written into the management areasector when the update data is written into the management area sector.

When the data is read from the flash memory, it is determined whetherthe signature written in the management area sector is correct or not bycomparing the signature with fixed data. If the signature is notcorrect, it is determined whether a signature written in the backupsector is correct or not. In a case where only the signature written inthe backup area is correct, the data stored in the backup sector iswritten into the management area sector (see FIG. 9 of the patentdocument 1).

An invention of a data duplexing system in which data is written andstored into a master memory apparatus and a slave memory apparatus isdisclosed (see, e.g., Patent Document 2). This system includes a statustable in a control apparatus. A writing flag is set in an area of themaster memory apparatus in the table when the data is being written intothe master memory apparatus. A written flag is set in an area of theslave memory apparatus in the table when the data is being written intothe slave memory apparatus. The duplexing system detects an accidentwhen the data is being written in a state where the flag is set in thearea of the master memory apparatus or the slave memory apparatus.

-   Patent Document 1: Japanese Laid-Open Patent Application No.    2008-71223-   Patent Document 2: Japanese Laid-Open Patent Application No.    2006-79522

DISCLOSURE OF INVENTION Problem to be Solved by the Invention

However, according to the apparatus of patent document 1, since awriting process of the update data is completed through many accessprocesses such as a data delete process, a data write process, asignature clear process, a data delete process and a data write process,the processing time may become longer. This is because the nonvolatilememory requires more access time than a register, a cache, a RAM, etc.

Therefore, in a case where the apparatus disclosed in patent document 1is applied to a control apparatus of a vehicle, for example, it takes along time to shut down a vehicle system. Thus, a user, such as a driveror the like, may suffer.

The system disclosed in patent document 2 includes the status table inthe control apparatus, and it is necessary to store the status table ina nonvolatile memory. Thus, the cost of the system as a whole isincreased. Further, the cost of the system is increased, since thesystem includes the master memory apparatus and the slave memoryapparatus. Furthermore, the processing time becomes longer, since it isnecessary for the system to access both memories.

The present invention solves the problems as described above. It is anaspect of the present invention to provide an information managementapparatus and an information managing method that can write data into anonvolatile memory at high speed and suppress loss of data.

Means for Solving the Problems

In order to achieve the aspect as described above, an embodiment of thepresent invention provides an information management apparatus formanaging data which includes a rewritable nonvolatile memory and amemory controller configured to control inputting information into andoutputting information from the nonvolatile memory, wherein the memorycontroller overwrites a data, which includes a first validity checkinformation, a first data body, a second validity check information, asecond data body having the same data as the first data body and a thirdvalidity check information arranged in this order, in a designatedaddress area in the nonvolatile memory when the memory controllerperforms a writing control in which the memory controller writes data inthe nonvolatile memory.

Effects of the Invention

In accordance with the present invention, an information managementapparatus and an information managing method that can write data into anonvolatile memory at high speed and can suppress loss of data can beprovided.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an example of system configuration of an informationmanagement apparatus according to one embodiment of the presentinvention;

FIG. 2 shows another example of the system configuration of theinformation management apparatus according to the one embodiment of thepresent invention;

FIG. 3 shows an image which indicates a designated address area in thenonvolatile memory;

FIG. 4 shows an image which indicates data stored in the designatedaddress area in the nonvolatile memory in a case where power shut-downor the like occurs within a writing process of a data block;

FIG. 5 shows an image which indicates data stored in the designatedaddress area in the nonvolatile memory in a case where the powershut-down or the like occurs within a writing process of the data block;

FIG. 6 shows a process flow of the writing control which is executed bya micro computer;

FIG. 7 shows a process flow of a reading control which is executed bythe micro computer;

FIG. 8 shows another example of a process flow of the reading controlwhich is executed by the micro computer;

FIG. 9 shows another example of a process flow of the reading controlwhich is executed by the micro computer; and

FIG. 10 shows another example of a process flow of the reading controlwhich is executed by the micro computer.

BEST MODE FOR CARRYING OUT THE INVENTION

In the following, preferred embodiments of the present invention aredescribed with reference to the drawings.

An information management apparatus and an information managing methodaccording to the present invention are preferably applied to a vehiclecontrol apparatus that stores a learning value obtained through vehiclecontrol into a nonvolatile memory at the end of controlling a vehiclesystem, reads the learning value from the nonvolatile memory and uses itfor the vehicle control when the vehicle system is started.

Herein, the information management apparatus and the method for managinginformation according to the present invention is applied not only tothe vehicle control apparatus which controls devices mounted on thevehicle, but is also applied to a device or a system such as a controlapparatus mounted on a mode of transportation such as a ship, an airplane or the like, a personal computer, a cellular phone, a television,a game machine etc. Hereinafter, embodiments in which the informationmanagement apparatus and the method for managing information are appliedto the vehicle control apparatus will be described.

<Embodiment>

In the following, the information management apparatus and the methodfor managing information according to one embodiment of the presentinvention are described with reference to the drawings.

<Basic Configuration>

FIG. 1 shows an example of system configuration of an informationmanagement apparatus 1 according to one embodiment of the presentinvention. The information management apparatus includes a microcomputer 10 and a rewritable nonvolatile memory 20 as a main component.The nonvolatile memory 20 may be an EEPROM, for example. A CD-R, aCD-RW, a DVD-R, DVD-RW, a DVD-RAM, a hard disk or the like may also beused as the nonvolatile memory 20. The micro computer 10 and thenonvolatile memory 20 are connected by a communication wire 30, andtransmit and receive information under a serial communication protocol.

Herein, an embodiment of a connection between the micro computer 10 andthe nonvolatile memory 20 is not limited to the one as shown in FIG. 1.FIG. 2 shows another example of the system configuration of theinformation management apparatus 1 according to the embodiment of thepresent invention. As shown in FIG. 2, the micro computer 10 and thenonvolatile memory 20 are connected by a bus system which includes aaddress bus 32 and a data bus 34.

The micro computer 10 includes a CPU (Central Processing Unit), a RAM(Random Access Memory), a ROM (Read Only Memory), an I/O, a register, acache memory or the like. The micro computer 10 includes a built-incounter 12.

Detection values of sensors, such as an accelerator pedal positionsensor, a speed sensor, a acceleration sensor, a crank angle sensor orthe like, that detect the status of a vehicle are input into the microcomputer 10. The micro computer 10 outputs control signals forcontrolled devices, such as a throttle motor, an igniter, atransmission, a driving motor or the like, based on the detection valuesthat are input from the sensors. As a basic example, the micro computer10 determines a target torque of an engine based on a map or a formulawhich includes an accelerator pedal position and a speed of the vehicleas input parameters, and controls the throttle motor and thetransmission so that the engine outputs a torque that is equal to thetarget torque.

As described above, for example, the micro computer 10 constitutes acontrol apparatus which controls the engine and the transmission, themicro computer 10 may constitute a control apparatus for controlling anelectronic control brake apparatus, a control apparatus for controllinga power steering apparatus, a vehicle stability control apparatus suchas a VSC (Vehicle Stability Control), VDIM (Vehicle Dynamics IntegratedManagement) or the like, and a control apparatus for controlling anavigation apparatus. Further, the micro computer 10 may constitute anintegrated control apparatus which has the functions of the controlapparatuses as described above.

The micro computer 10 learns control information through controls ofdevices mounted on the vehicle. As for learning the control information,various types of techniques are known. As an example of learning thecontrol information of the transmission, a technique which controls andoptimizes shift timing in accordance with individual differences orabrasion of constructive members of the transmission is known. The microcomputer 10 monitors the occurrence of a shift shock based on an outputof the accelerator sensor and learns an appropriate activation timing ofa lock-up clutch etc.

In a case where the micro computer 10 constitutes a control apparatuswhich performs an automatic deceleration control based on the locationof the vehicle, i.e. in a case where the micro computer 10 controls downshifting and braking in front of a curve or a toll gate by verifying mapdata and the location of the vehicle, the micro computer 10 learns thatdeceleration is not performed in front of a toll gate which does notactually exist (has been abandoned) but is included in the map data. Themicro computer 10 can be set not to perform automatic decelerationcontrol at the location.

It is possible to learn control information of various controlleddevices when the micro computer 10 controls devices mounted on thevehicle. There is no limitation for the devices to which the presentinvention can be applied.

The learning value which has been learned by the micro computer 10 whenthe micro computer 10 is controlling the devices, is stored in thenonvolatile memory 20 at the end of controlling a vehicle system. Theend of controlling the vehicle system may be, for example, when a driverof the vehicle operates a key from the ACC-on position to the ACC-offposition. A power is supplied from a battery mounted on the vehicle tothe micro computer 10 and other control apparatuses while datatransmission from the micro computer 10 to the nonvolatile memory 20 isbeing performed.

The micro computer 10 reads the learning value stored in the nonvolatilememory 20 and uses it thereafter when the vehicle system is started. Thestart of the vehicle system may be, for example, when the driveroperates the key from the ACC-off position to the ACC-on position.Accordingly, it is possible to maintain a sequentiality of control, andto control the devices mounted on the vehicle in accordance withconditions of the vehicle.

<Characteristic Process>

Herein, according to the control apparatuses mounted on the vehicle, awriting process may not be completely finished in a case where a batteryof the vehicle is replaced by a user of the vehicle or a repair shopshortly after the vehicle is stopped. As a result, the learning value isstored partially in the nonvolatile memory 20, and the partially storedleaning value is carried over to the next use of the vehicle. There is acase in that the data may be compromised. In this case, it is difficultfor the micro computer 10 to use the learning value, which has beencollected, thereafter.

Accordingly, the information management apparatus 1 according to thepresent embodiment suppresses loss of the data by executing acharacteristic process as described below.

<Writing Control>

The micro computer 10 repeatedly overwrites data which includes amatching keyword A, data block 1, a matching keyword B, data block 2 anda matching keyword C that are arranged in this order into a designatedaddress area 20A in the nonvolatile memory 20 when the micro computer 10writes the learning values which has been collected through the controlof the devices mounted on the vehicle.

Herein, the matching keyword A corresponds to a first validity checkinformation in the claims, the matching keyword B corresponds to asecond validity check information in the claims and the matching keywordC corresponds to a third validity check information, respectively.

Data block 1 and data block 2 have the same data which constitutes a setof the learning values that the micro computer 10 has learned throughthe control of the devices mounted on the vehicle. Data block 1corresponds to a first data body in the claims and a data block 2corresponds to the second data body in the claims.

FIG. 3 shows an image which indicates the designated address area 20A inthe nonvolatile memory 20. Herein, the designated address area 20A is acontiguous area as a physical address. As shown in FIG. 3, the matchingkeyword A to the matching keyword C are arranged contiguously in thedesignated address area 20A.

The micro computer 10 arranges the learning values in the RAM at the endof controlling the vehicle system, and then generates and prepares thecontiguous data in a designated area in the RAM as shown in FIG. 3. Thenthe micro computer 10 transfers the data stored in the designated areain the RAM to the designated address area 20A in the nonvolatile memory20 in block (by designating only a starting address). Herein, the datamay be divided and transferred sequentially in a case where the size ofthe data is in excesses of the maximum size of the data that thenonvolatile memory 20 can receive at one time. In this case, the microcomputer 10 repeatedly executes a transmitting process whereby the microcomputer 10 transmits a unit of data and transmits a next unit of datawhen the micro computer 10 receives a response indicating completion ofthe writing process from the nonvolatile memory 20.

It becomes possible to write data in the nonvolatile memory 20 at highspeed by executing a data transferring process in block as describedabove. In general, an access speed of the nonvolatile memory 20 isslower than that of a cache memory, a RAM or the like. It becomespossible to enhance the speed of the writing process of data byexecuting the data transferring batch process.

The matching keywords A to C constitute count values that are generatedby the counter 12, for example, and are set to the same value. Thus, ina case where the count values are set to 20, the data which is going tobe written in the nonvolatile memory 20 includes data indicating thecount value of 20, data block 1, data indicating the count value of 20,data block 2 and a data indicating the count value of 20 arranged inthis order.

It becomes possible to suppress (minimize) the loss of the data bywriting data in the nonvolatile memory 20 in a manner as describedabove. Hereinafter, the reason thereof will be described.

As described above, according to the information management apparatus 1of the present embodiment, there is a possibility of the occurrence ofan accident such as power shut-down or the like when the present data isbeing written. It depends on the time at which the accident occursduring the present writing process that determines whether any of datablock 1 and/or block data 2 are written in an incomplete manner (or arepossibly compromised) or not.

FIG. 4 shows an image which indicates data stored in the designatedaddress area 20A in the nonvolatile memory 20 in a case where the powershut-down or the like occurs during a present writing process of datablock 1. In FIG. 4, numeral 20B indicates data written at a time atwhich the power shut-down or the like has occurred. In FIG. 4 and FIG. 5as described later, the count value is set to 20 when the previouscomplete writing process was performed, and the count value of thepresent writing process is set to 21.

As shown in FIG. 4, only the matching keyword A has the value of 21, andthe matching keywords B and C have the values of 20 in a case where thepower shut-down has occurred during the present writing process of datablock 1. Thus, it turns out that the power shut-down occurred during thepresent writing process of data block 1 if the matching keyword A doesnot correspond to the other matching keyword.

In this case, the micro computer 10 selects data block 2 and uses it forcontrolling the vehicle system when the vehicle system is started thenext time. Since last completed data block 2 includes the data which waswritten in the last completed writing control, it is impossible toreflect the data of the present writing control. It is possible tosuppress data loss for only a single writing control.

FIG. 5 shows an image which indicates data stored in the designatedaddress area 20A in the nonvolatile memory 20 in a case where the powershut-down or the like has occurred during a present writing process ofdata block 2. In FIG. 5, the numeral 20B indicates data written at atime at which the power shut-down or the like has occurred.

As shown in FIG. 5, the matching keywords A and B have the value of 21,and only the matching keyword C has the values of 20 in a case where thepower shut-down has occurred during the present writing process of datablock 2. Thus, it turns out that the power shut-down has occurred duringthe present writing process of data block 2 if the matching keyword Cdoes not correspond to the other matching keyword.

In this case, the micro computer 10 selects data block 1 and uses it forcontrolling the vehicle system when the vehicle system is started thenext time.

Herein, any one of the data blocks may be selected in a case where allof the matching keywords A to C correspond to each other. In this case,data block 1 may be selected, as a matter of convenience.

Thus, the information management apparatus 1 of the present embodimentcan suppress data loss by storing the data, which includes the matchingkeyword A, data block 1, the matching keyword B, data block 2 and thematching keyword C that are arranged in this order, into the designatedaddress area 20A in the nonvolatile memory 20. Since the informationmanagement apparatus 1 of the present embodiment overwrites thecontiguous data as described above into the same address area, theinformation management apparatus 1 can perform a backup function asdescribed hereinafter.

FIG. 6 shows a process flow of the writing control which is executed bythe micro computer 10. This flow is executed at the end of controllingthe vehicle system, as described above.

First, the micro computer 10 writes the matching keyword A in thenonvolatile memory 20 (S100). Then the micro computer 10 writes datablock 1 in the nonvolatile memory 20 (S102). Then the micro computer 10writes the matching keyword B in the nonvolatile memory 20 (S104). Thenthe micro computer 10 writes data block 2 in the nonvolatile memory 20(S106). Finally, the micro computer 10 writes the matching keyword C inthe nonvolatile memory 20 (S108).

<Reading Control>

As described above, the micro computer 10 selects any one of data block1 and data block 2 based on a matching condition of the matchingkeywords A to C with the other keywords when the micro computer 10 readsthe learning value (the data block) from the nonvolatile memory 20. Themicro computer 10 uses the data block selected from the data blocks 1and 2.

According to the present embodiment, the micro computer 10 selects anyone of data block 1 and data block 2 based on sameness of the keywords Ato C with the other keywords, since the micro computer 10 writes thesame count values generated by the counter 12 in the nonvolatile memory20 as the matching keywords A to C in the writing control.

FIG. 7 shows a process flow of the reading control which is executed bythe micro computer 10. As described above, this flow is executed whenthe vehicle system is started.

First, the micro computer 10 reads the matching keyword A from thenonvolatile memory 20 (S200). Then the micro computer 10 reads thematching keyword B from the nonvolatile memory 20 (S202). The keywords Aand B that are read at steps S200 and S202 are stored into the registeror the like in the micro computer 10.

Then the micro computer 10 determines whether the matching keyword A andthe matching keyword B correspond to each other (S204).

If the matching keyword A and the matching keyword B correspond to eachother, the micro computer 10 reads data block 1 (S206), and then readsthe matching keyword C (S208). Data block 1 which is read at S206 isstored into the cache memory, the RAM or the like. The keyword C whichis read at 5208 is stored into the resister or the like in the microcomputer 10.

Further, the micro computer 10 determines whether the matching keyword B(or the keyword A) and the matching keyword C correspond to each other(S210). The micro computer 10 finishes one routine of the present flow,if the matching keyword B (or the matching keyword A) and the matchingkeyword C correspond to each other. In this case, data block 1 which isread at S206 is used for controlling the vehicle system.

On the contrary, if the keyword B (or the keyword A) and the keyword Cdo not correspond to each other, the micro computer 10 replaces datablock 2 by data block 1 (S212). This is because it is determined thatthe power shut-down or the like has occurred during the writing processof data block 2 when the matching keyword C does not correspond to theother keywords, as described above. Specifically, the micro computer 10recovers data block 2 by writing data block 1 read at S206 into theaddress area in the nonvolatile memory 20 in which data block 2 isstored.

Further, the micro computer 10 replaces the matching keyword C by thematching keyword B (or the matching keyword A) (S214). Through theseprocesses, data block 2 is recovered, and the matching keywords A to Ccorrespond to each other again.

If the keyword A and the keyword B do not correspond to each other atS204, the micro computer 10 reads data block 2 (S216). Data block 2 readat S216 is stored into the cache memory, the RAM or the like. In thiscase, the data block read at 5216 is used (selected) for control, andthe backup function which is performed by data block 2 is realized.

If the matching keyword A does not correspond to the other matchingkeyword, the micro computer 10 can omit a correction process of thematching keyword as shown in S214. For example, in the present readingcontrol, the matching keywords (A, B, C) are assumed to be (21, 20, 20)or the like. In this case, if the power shut-down or the like occursduring the writing process of data block 1 in the next writing control,the matching keywords (A, B, C) become (22, 20, 20). As a result, datablock 2 is selected.

On the contrary, if the power shut-down or the like occurs during thewriting process of data block 2 in the next writing control, thematching keywords (A, B, C) become (22, 22, 20). As a result, data block1 is selected, and data block 2 is recovered.

In both cases, the data block of which the writing process has finishednormally is selected. Thus particular problem as described above doesnot occur.

However, if the matching keyword C does not correspond to the othermatching keyword, the matching keywords (A, B, C) is assumed to be (21,21, 20) or the like, in this reading control. In this case, if the powershut-down or the like occurs during the writing process of data block 1in the next writing control, the matching keywords (A, B, C) become (22,21, 20).

In this case, the micro computer 10 can not determine which one toselect from data block 1 and data block 2. Thus, the micro computer 10performs a correction process of the matching keyword only in a casewhere the matching keyword C does not correspond to the other matchingkeyword.

The information management apparatus 1 of the present embodiment, asdescribed above, can suppress data loss by overwriting data, whichincludes the matching keyword A, data block 1, the matching keyword B,data block 2 and the matching keyword C that are arranged in this order,into the designated address area 20A in the nonvolatile memory 20.

Since the information management apparatus 1 of the present embodimentexecutes a simple process in which the contiguous data is simply writteninto the designated address area 20A in the nonvolatile memory 20, theinformation management apparatus 1 can finish the writing control bydata transferring batch process. As a result, it is possible to writedata in the nonvolatile memory 20 at high speed.

Thus, the information management apparatus 1 of the present embodimentcan write data in the nonvolatile memory 20 at high speed and suppressdata loss.

Further, since the information management apparatus 1 of the presentembodiment stores the data in the single nonvolatile memory 20 and doesnot require another nonvolatile memory or the like in the micro computer10, it is possible to reduce a cost of the information managementapparatus 1.

Herein, the process flow as shown in FIG. 6 corresponds to a datawriting step in the claims. The process flow as shown in FIG. 7corresponds to a data reading step in the claims. The processes of S206and S216 correspond to a data selecting step in the claims. Theprocesses of S204 and S210 correspond to a determining step in theclaims. The process of S212 corresponds to a data recovering step in theclaims.

Although various embodiments for carrying out the invention aredescribed above, the present invention is not limited to theseembodiments, but variations and modifications may be made withoutdeparting from the scope of the present invention.

For example, the values of the matching keywords A to C may not be setto the same value. In this case, for example, three values that havesome sort of correlation may be set to the matching keywords A to C. Ina case where the count value generated by the counter 12 is used forsetting the matching keywords, and the count value is 3, the matchingkeywords (A, B, C) may be set to (3, 30, 300), (3, 9, 27) or the like.If the matching keywords are not limited to numerals, the matchingkeywords may be set to text information such as (3A, 3B, 3C) or thelike.

Although the counter 12 is described as an increment counter, thecounter 12 may be a decrement counter.

Although, data block 1 is not recovered in a case where data block 2 isselected, as described above, data block 1 may be recovered in a casewhere data block 2 is selected, considering a cause besides the powershut-down. FIG. 8 shows a process flow of the case described above.According to FIG. 8, the micro computer 10 reads data block 2 (S216) andreplaces data block 1 by data block 2 (S218), in a case where thematching keyword A and the matching keyword B do not correspond to eachother.

Even though the number of times of memory access increases in thereading control, by doing this, it becomes possible to suppress dataloss more effectively.

The correction process of the matching keyword may be executed afterS216. In this case, the matching keywords B and C are replaced by thematching keyword A. FIG. 9 shows a process flow of the case as describedabove. According to FIG. 9, the micro computer 10 reads data block 2(S216) and replaces the matching keywords B and C by the matchingkeyword A (S220), in a case where the matching keyword A and thematching keyword B do not correspond to each other.

Even though the number of times of memory access increases in thereading control, by doing this, it becomes possible to suppress dataloss more effectively.

In a case where data block 2 is selected, data block 1 may be recoveredand the correction process of the matching keyword may be executed afterS216. FIG. 10 shows a process flow of the case as described above.According to FIG. 10, the micro computer 10 reads data block 2 (S216),replaces data block 1 by data block 2 (S218) and replaces the matchingkeywords B and C by the matching keyword A (S220), in a case where thematching keyword A and the matching keyword B do not correspond to eachother.

Even though the number of times of memory access increases in thereading control, by doing this, it becomes possible to suppress dataloss more effectively.

INDUSTRIAL APPLICABILITY

The present invention can be widely applied to the computer industry,the transportation industry such as the automobile industry or the like,and the automotive parts industry thereof.

DESCRIPTION OF REFERENCE NUMERALS

-   1 information management apparatus-   10 micro computer-   12 counter-   20 nonvolatile memory-   30 communication wire-   32 address bus-   34 data bus

1. An information management apparatus for managing data comprising: arewritable nonvolatile memory; and a memory controller configured tocontrol inputting information into and outputting information from thenonvolatile memory, wherein the memory controller overwrites a data,which includes a first validity check information, a first data body, asecond validity check information, a second data body having the samedata as the first data body and a third validity check informationarranged in this order, in a designated address area in the nonvolatilememory when the memory controller performs a writing control in whichthe memory controller writes data in the nonvolatile memory.
 2. Theinformation management apparatus according to claim 1, wherein thememory controller selects any one of the first data body and the seconddata body based on a matching condition of the first validity checkinformation to the third validity check information with the othervalidity check information when the memory controller performs a readingcontrol in which the memory controller reads the data written in thenonvolatile memory under the writing control.
 3. The informationmanagement apparatus according to claim 2, wherein the memory controllerwrites the same information in the nonvolatile memory as the firstvalidity check information through the third validity check informationunder the writing control, and selects any one of the first data bodyand the second data body based on sameness of the first validity checkinformation through the third validity check information with the othervalidity check information under the reading control.
 4. The informationmanagement apparatus according to claim 3, wherein the first validitycheck information through the third validity check information are countvalues generated by a counter.
 5. The information management apparatusaccording to claim 2, wherein the memory controller recovers any one ofthe first data body and the second data body based on the matchingcondition of any of the first validity check information through thethird validity check information with the other validity checkinformation, in a case where any of the first validity check informationthrough the third validity check information do not correspond to theother validity check information under the reading control.
 6. Theinformation management apparatus according to claim 5, wherein thememory controller selects the first data body and recovers the seconddata body by replacing the second data body by the first data body in acase where the third validity check information does not correspond tothe other validity check information under the reading control.
 7. Theinformation management apparatus according to claim 2, wherein the firstdata body and the second data body are learning values obtained throughcontrol of a device mounted on a vehicle, wherein the writing control isperformed at the end of controlling a vehicle system, and wherein thereading control is performed when the vehicle system is started.
 8. Aninformation managing method executed by a computer for managing datastored in a rewritable nonvolatile memory, comprising: storing data,which includes a first validity check information, a first data body, asecond validity check information, a second data body having the samedata as the first data body and a third validity check information thatare arranged in this order, in a designated address area in thenonvolatile memory.
 9. The information managing method according toclaim 8, further comprising: reading the data which is stored in thenonvolatile memory in the storing the data, wherein the reading the dataincludes selecting any one of the first data body and the second databody based on a matching condition of the first validity checkinformation through the third validity check information with the othervalidity check information.
 10. The information managing methodaccording to claim 9, wherein the same information is written in thenonvolatile memory as the first validity check information to the thirdvalidity check information in the storing the data, and wherein any oneof the first data body and the second data body is selected based onsameness of the first validity check information through the thirdvalidity check information with the other validity check information inthe selecting.
 11. The information managing method according to claim10, wherein count values generated by a counter are stored in thenonvolatile memory as the first validity check information through thethird validity check information.
 12. The information managing methodaccording to claim 9, wherein the reading the data further includes:determining whether the first validity check information through thethird validity check information correspond to the other validity checkinformation; and recovering any one of the first data body and thesecond data body based on the matching condition of any of the firstvalidity check information to the third validity check information withthe other validity check information, in a case where any of the firstvalidity check information through the third validity check informationdo not correspond to the other validity check information.
 13. Theinformation managing method according to claim 12, wherein, in theselecting, the second data body is selected in a case where the firstvalidity check information does not correspond to the other validitycheck information, and the first data body is selected in a case wherethe third validity check information does not correspond to the othervalidity check information, and wherein, in the recovering, the seconddata body is replaced by the first data body in a case where the thirdvalidity check information does not correspond to the other validitycheck information.
 14. The information managing method according toclaim 9, wherein the computer and the rewritable nonvolatile memory aremounted on a vehicle, wherein the first data body and the second databody are learning values obtained through a control of a device mountedon the vehicle, wherein the storing the data is performed at the end ofcontrolling a vehicle system, and wherein the reading the data isperformed when the vehicle system is started.